package com.eshipenet.shipnet.equipmentextbuilder

import play.api.libs.json.{JsObject, JsValue}

import scala.util.Try

object Equipment {

  def apply(raw: JsValue): Try[Equipment] = Try {
    val id = (raw \ "id").as[String]
    Equipment(id, raw.as[JsObject])
  }

}

case class Equipment(id: String, raw: JsObject)
